package com.medreams.dao;

import com.medreams.domain.Test;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

//将TestDao交给ioc容器管理生成代理对象 从而进行执行
@Repository
public interface TestDao {

    @Select("select * from test")
    List<Test> getList();

    @Insert("insert into test (user_name,create_time) values (#{user_name},#{create_time})")
    Integer addTest(Test test);

}
